package com.tao.mydownloadlibrary.utils;

/**
 * reate by tao on{DATE}
 */
public class TextUtil {
    public static String clearSpecialText(String str) {
        String regEx1 = "[`~!@#$%^&*()+=|{}':;'\\\\<>/?~！@#￥%……&*（）——+|{}【】'；：”“’。、？]";
        String regex2 = "\t|\r|\n|\\s*";
        return repleaseText(repleaseText(str,regEx1), regex2);
    }

    public static String repleaseText(String str, String regEx) {
        return str.replaceAll(regEx, "").trim();
    }
}
